import 'package:flutter/material.dart';

import 'package:lx_location_plugin_example/pages/home_page.dart';
import 'package:lx_location_plugin_example/route/routes.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {

  // 定义全局Key
  final GlobalKey<NavigatorState> navigatorKey = GlobalKey();

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      navigatorKey: navigatorKey,
      initialRoute: HomePage.routeName,
      routes: appRoutes,
    );
  }
}
